$(document).ready(function() {
	$("#top-menu-list").children().each(function (index, domEle){
		$(domEle).children("a").children("img").click(function(){
			$("#top-menu-list").children().each(function (i, dom){
				$(dom).children("a").children("img").css("background-color","#E2EAF5");
				$("#" + $(dom).attr("value")).css("display","none");
			});
			$(domEle).children("a").children("img").css("background-color","#CEE0F6");
			$("#left_menu").panel("setTitle",$(domEle).children("a").children("img").attr("title"));
			$("#" + $(domEle).attr("value")).css("display","block");
		});
	});
	
	$("#book_a_1").click(function(){
		$("#tt").tabs("add",{    
		    title:"图书漂流",    
		    cls:"main_body",
		    href:"../view/home/bookList.jsp",
		    closable:true,    
  
		});  
	});
	$("#share_a_1").click(function(){
		$("#tt").tabs("add",{    
		    title:"资料分享",    
		    cls:"main_body",
		    href:"../view/home/share.jsp",
		    closable:true,    
  
		});  
	});
});